local meta = FindMetaTable("Entity")
if not meta then return end

function meta:TakeSpecialDamage(a, b, c, d)
	self:TakeDamage(a, c, d)
end

function meta:CreateDebris()
	local ent = ents.Create("prop_scaledprop")
	if ent:IsValid() then
		ent:SetModel(self:GetModel())
		ent:SetPos(self:GetPos())
		ent:SetAngles(self:GetAngles())
		ent:SetMaterial(self:GetMaterial())
		ent:SetCollisionGroup(COLLISION_GROUP_DEBRIS)
		ent:Spawn()
		local phys = ent:GetPhysicsObject()
		if phys:IsValid() then
			phys:Wake()
			phys:SetVelocityInstantaneous(self:GetVelocity() * 1.1 + Vector(0, 0, 100))
		end

		ent:Fire("kill", "", 10)
	end
end
